#ifndef __LINK_H__
#define __LINK_H__ 

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h> //用于usleep实现缓慢切换楼层的效果
#include "kernel_list.h"//内核链表的头节点

#define FLOOR_NUM 10
#define ADVER_NUM 4


//楼层节点结构体
typedef struct floornode
{
    int current_floor;//当前楼层
    int target_floor;//目标楼层
    char floorimg[128];//楼层图片路径

    struct list_head floor_list;//楼层小结构体链表

}floor_info;

//广告节点结构体
typedef struct advernode
{
    char adverimg[128];//广告图片路径
    int current_adver;//当前播放的广告

    struct list_head adver_list;//广告小结构体链表
}adver_info;


//函数声明
/*.....................楼层...........................*/
floor_info *init_floor_list(void);
floor_info *create_floor_node(char *floorimg ,int i);

/*.....................广告...........................*/
adver_info *init_adver_list(void);
adver_info *create_adver_node(char *adverimg,int i);



void list_tail_floor(floor_info *floor_head, floor_info *floor_new,adver_info *adver_head,adver_info *adver_new);

#endif